#include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e4 + 10;
int is1[N], is2[N];
void merge(int low, int mid, int high)
{
	int i = low, j = mid + 1, k = low;
	while (i <= mid && j <= high)
	{
		if (is1[i] > is1[j])
			is2[k++] = is1[j++];
		else
			is2[k++] = is1[i++];
	}
	while (i <= mid)
		is2[k++] = is1[i++];
	while (j <= high)
		is2[k++] = is1[j++];
	for (int i = low; i <= high; i++)
		is1[i] = is2[i];
}
void mergesort(int a, int b)
{
	if (a >= b)
		return;
	int mid = (a + b) / 2;
	mergesort(a, mid);
	mergesort(mid + 1, b);
	merge(a, mid, b);
}
int main()
{
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++)
		cin >> is1[i];
	mergesort(1, n);
	for (int i = 1; i <= n; i++)
		cout << is1[i] << " ";
	return 0;
}